#include "Logger.h"

namespace Logger {

Log::Log() {

}

Log::~Log() {
	for (int i = 0; i < outputs_.size(); ++i)
		delete outputs_[i];
}

void Log::addOutput(Output * out) {
	outputs_.push_back(out);
}

void Log::onNewMessage(const QString & msg, int type) {
	for (int i = 0; i < outputs_.size(); ++i)
		outputs_[i]->log(msg, (MsgType)type);
}

} // namespace Logger
